package com.xyf.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalTime;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("tb_maintain_record")
@ApiModel(value="维修记录", description="维修记录信息表")
public class TbMaintainRecord {
  private static final long serialVersionUID = 1L;

  @ApiModelProperty(value = "维修记录ID")
  @TableId(value = "id" , type = IdType.AUTO)
  private Integer id;
  @ApiModelProperty(value ="汽车id")
  private Integer carId;
  @ApiModelProperty(value ="维修厂id")
  private Integer maintainShopId;
  @ApiModelProperty(value ="维修金额")
  private BigDecimal amount;
//  @ApiModelProperty(value ="维修时间")
//  private java.sql.Timestamp addtime;
  @ApiModelProperty(value ="备注")
  private String remark;


    @TableField(exist = false)
    @ApiModelProperty(value ="维修厂信息")
    private TbMaintainShop tbMaintainShop;

    @TableField(exist = false)
    @ApiModelProperty(value ="汽车信息")
    private TbCar tbCar;

    @ApiModelProperty(value ="维修时间")
  @TableField(fill = FieldFill.INSERT) //插入时执行
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
  private Date addtime;
}
